<?php

$search_file="p_search.php";
$lines = file('./parse/recommend.txt');
foreach ($lines as $line_num => $buffer) {

	

	if(preg_match("/^#/",$buffer,$m)) continue;
	if(preg_match("/----/",$buffer,$m)) {
		echo "<hr size=3 color=#33ea88>\n";
		continue;
	}

	//$buffer=preg_replace('/\n$/',"",$buffer);
	$option1="s";
	$option1="";

	if(preg_match("/^S\:/",$buffer,$m)) {
		$option1="<span class=small>";
		$option2="</span>";
	}


	$line=preg_split("/\s\s+/",$buffer,2);

	$url=preg_replace('/\n$/',"",$line[1]);
	$url=preg_replace('/\r$/',"",$url);
	$url=preg_replace('/\n$/',"",$url);
	$url=preg_replace('/\s/',"",$url);

	
	$line[0]=preg_replace('/^S\:/',"",$line[0]);

	if($url){
		$url=preg_replace('/\{base_url\}/',$base_url,$url);
		echo "<li> $option1 <a href=\"$url\">". $line[0]." </a> $option2 </li> \n";
	}
	else
	{
		echo "&nbsp;". $line[0]." \n";
	}
}
?>
